home *** CD-ROM | disk | FTP | other *** search
/ Champak 128 / Vol 128 (Damaged).iso / games / scooby_d.swf / scripts / __Packages / com / ndimedia / ui / TextBox.as < prev    next >
Encoding:
Text File  |  2011-03-26  |  827 b   |  43 lines

  1. class com.ndimedia.ui.TextBox extends com.ndimedia.ui.UIObject
  2. {
  3.    var m_format;
  4.    var m_namespace = "TextBox";
  5.    var m_text = "";
  6.    var m_width = 1024;
  7.    function TextBox(scope, txt, w)
  8.    {
  9.       super(scope,false);
  10.       this.m_format = new TextFormat();
  11.       this.m_format.size = 16;
  12.       this.m_format.font = "Arial";
  13.       this.m_text = txt;
  14.       if(w)
  15.       {
  16.          this.m_width = w;
  17.       }
  18.       this.repaint();
  19.    }
  20.    function get text()
  21.    {
  22.       return this.m_text;
  23.    }
  24.    function set text(txt)
  25.    {
  26.       this.m_text = txt;
  27.       this.repaint();
  28.    }
  29.    function get format()
  30.    {
  31.       return this.m_format;
  32.    }
  33.    function get width()
  34.    {
  35.       return this.m_width;
  36.    }
  37.    function setWidth(w)
  38.    {
  39.       this.m_width = w;
  40.       this.repaint();
  41.    }
  42. }
  43.